package com.ftg.learn.smhtml.mapper;


import com.ftg.learn.smhtml.pojo.About;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface AboutMapper {
    @SelectProvider(type=AboutSql.class,method="getCountSql")
    public List<About> getCount(String id);

    @SelectProvider(type=AboutSql.class,method="getShowAllSql")

    public List<About> showAll(String  id,int begin,int end);

    @Select("select * from about where aid = #{id}")
    public List<About> findone(String id);

    @Update("update about set aname=#{aname},acontent=#{acontent} where aid=#{aid}")
    public int update(About about);

    @Delete("delete from about where aid=#{id}")
    public int delete(String id);

    @Insert("insert into about(aid,aname,acontent) values(#{aid},#{aname},#{acontent})")
    public int save(About about);
}